public class QuickSort {    
 
	private static void sort(int[] num, int left, int right) {
		if (left < right) {
			int s = number[(left+right)/2];
			int i = left-1;
			int j = right + 1;
			while (true) {
				while (num[--i] < s)
					;
				while (num[++j]> s)
					;
				if (i >= j)
					break;
				swap(num, i, j);
			}
			sort(num, left, j - 1);
			sort(num, j + 1, right);
		}
	}

	private static void swap(int[] number, int i, int j) {
		int t;
		t = number[i];
		number[i] = number[j];
		number[j] = t;
	}
}